.class Lcom/brixd/niceapp/activity/SearchMoreActivity$AppsAdapter;
.super Landroid/widget/BaseAdapter;
.source "SearchMoreActivity.java"


# annotations
.annotation system Ldalvik/annotation/EnclosingClass;
    value = Lcom/brixd/niceapp/activity/SearchMoreActivity;
.end annotation

.annotation system Ldalvik/annotation/InnerClass;
    accessFlags = 0x2
    name = "AppsAdapter"
.end annotation


# instance fields
.field private mAppModels:Ljava/util/ArrayList;
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "Ljava/util/ArrayList",
            "<",
            "Lcom/brixd/niceapp/model/AppModel;",
            ">;"
        }
    .end annotation
.end field

.field private mImageLoader:Lcom/nostra13/universalimageloader/core/ImageLoader;

.field private mOptions:Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

.field final synthetic this$0:Lcom/brixd/niceapp/activity/SearchMoreActivity;


# direct methods
.method public constructor <init>(Lcom/brixd/niceapp/activity/SearchMoreActivity;Ljava/util/ArrayList;)V
    .registers 6
    .annotation system Ldalvik/annotation/Signature;
        value = {
            "(",
            "Ljava/util/ArrayList",
            "<",
            "Lcom/brixd/niceapp/model/AppModel;",
            ">;)V"
        }
    .end annotation

    .prologue
    .local p2, "appModels":Ljava/util/ArrayList;, "Ljava/util/ArrayList<Lcom/brixd/niceapp/model/AppModel;>;"
    const v2, 0x7f0200b3

    const/4 v1, 0x1

    .line 111
    iput-object p1, p0, Lcom/brixd/niceapp/activity/SearchMoreActivity$AppsAdapter;->this$0:Lcom/brixd/niceapp/activity/SearchMoreActivity;

    invoke-direct {p0}, Landroid/widget/BaseAdapter;-><init>()V

    .line 112
    iput-object p2, p0, Lcom/brixd/niceapp/activity/SearchMoreActivity$AppsAdapter;->mAppModels:Ljava/util/ArrayList;

    .line 114
    invoke-static {}, Lcom/nostra13/universalimageloader/core/ImageLoader;->getInstance()Lcom/nostra13/universalimageloader/core/ImageLoader;

    move-result-object v0

    iput-object v0, p0, Lcom/brixd/niceapp/activity/SearchMoreActivity$AppsAdapter;->mImageLoader:Lcom/nostra13/universalimageloader/core/ImageLoader;

    .line 115
    new-instance v0, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    invoke-direct {v0}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;-><init>()V

    .line 116
    invoke-virtual {v0, v1}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->resetViewBeforeLoading(Z)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    .line 117
    invoke-virtual {v0, v1}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->cacheInMemory(Z)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    .line 118
    invoke-virtual {v0, v1}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->cacheOnDisc(Z)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    sget-object v1, Lcom/nostra13/universalimageloader/core/assist/ImageScaleType;->EXACTLY:Lcom/nostra13/universalimageloader/core/assist/ImageScaleType;

    .line 119
    invoke-virtual {v0, v1}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->imageScaleType(Lcom/nostra13/universalimageloader/core/assist/ImageScaleType;)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    sget-object v1, Landroid/graphics/Bitmap$Config;->ARGB_8888:Landroid/graphics/Bitmap$Config;

    .line 120
    invoke-virtual {v0, v1}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->bitmapConfig(Landroid/graphics/Bitmap$Config;)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    new-instance v1, Lcom/nostra13/universalimageloader/core/display/SimpleBitmapDisplayer;

    invoke-direct {v1}, Lcom/nostra13/universalimageloader/core/display/SimpleBitmapDisplayer;-><init>()V

    .line 121
    invoke-virtual {v0, v1}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->displayer(Lcom/nostra13/universalimageloader/core/display/BitmapDisplayer;)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    .line 122
    invoke-virtual {v0, v2}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->showImageForEmptyUri(I)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    .line 123
    invoke-virtual {v0, v2}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->showImageOnFail(I)Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;

    move-result-object v0

    .line 124
    invoke-virtual {v0}, Lcom/nostra13/universalimageloader/core/DisplayImageOptions$Builder;->build()Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

    move-result-object v0

    iput-object v0, p0, Lcom/brixd/niceapp/activity/SearchMoreActivity$AppsAdapter;->mOptions:Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

    .line 126
    return-void
.end method

.method static synthetic access$000(Lcom/brixd/niceapp/activity/SearchMoreActivity$AppsAdapter;Lcom/brixd/niceapp/model/AppModel;)V
    .registers 2
    .param p0, "x0"    # Lcom/brixd/niceapp/activity/SearchMoreActivity$AppsAdapter;
    .param p1, "x1"    # Lcom/brixd/niceapp/model/AppModel;

    .prologue
    .line 105
    invoke-direct {p0, p1}, Lcom/brixd/niceapp/activity/SearchMoreActivity$AppsAdapter;->gotoDetailActivity(Lcom/brixd/niceapp/model/AppModel;)V

    return-void
.end method

.method private gotoDetailActivity(Lcom/brixd/niceapp/model/AppModel;)V
    .registers 5
    .param p1, "appModel"    # Lcom/brixd/niceapp/model/AppModel;

    .prologue
    .line 170
    if-nez p1, :cond_3

    .line 179
    :cond_2
    :goto_2
    return-void

    .line 173
    :cond_3
    new-instance v0, Lcom/brixd/niceapp/util/DetailRequestCacheUtil;

    iget-object v1, p0, Lcom/brixd/niceapp/activity/SearchMoreActivity$AppsAdapter;->this$0:Lcom/brixd/niceapp/activity/SearchMoreActivity;

    invoke-virtual {v1}, Lcom/brixd/niceapp/activity/SearchMoreActivity;->getContext()Landroid/content/Context;

    move-result-object v1

    invoke-direct {v0, v1}, Lcom/brixd/niceapp/util/DetailRequestCacheUtil;-><init>(Landroid/content/Context;)V

    .line 174
    .local v0, "util":Lcom/brixd/niceapp/util/DetailRequestCacheUtil;
    invoke-virtual {p1}, Lcom/brixd/niceapp/model/AppModel;->getModuleType()Lcom/brixd/niceapp/constant/AppConstant$ModuleType;

    move-result-object v1

    sget-object v2, Lcom/brixd/niceapp/constant/AppConstant$ModuleType;->NICE_DAILY:Lcom/brixd/niceapp/constant/AppConstant$ModuleType;

    if-ne v1, v2, :cond_1e

    .line 175
    invoke-virtual {p1}, Lcom/brixd/niceapp/model/AppModel;->getId()I

    move-result v1

    invoke-virtual {v0, v1}, Lcom/brixd/niceapp/util/DetailRequestCacheUtil;->gotoNiceDailyDetail(I)V

    goto :goto_2

    .line 176
    :cond_1e
    invoke-virtual {p1}, Lcom/brixd/niceapp/model/AppModel;->getModuleType()Lcom/brixd/niceapp/constant/AppConstant$ModuleType;

    move-result-object v1

    sget-object v2, Lcom/brixd/niceapp/constant/AppConstant$ModuleType;->COMMUNITY:Lcom/brixd/niceapp/constant/AppConstant$ModuleType;

    if-ne v1, v2, :cond_2

    .line 177
    invoke-virtual {p1}, Lcom/brixd/niceapp/model/AppModel;->getId()I

    move-result v1

    invoke-virtual {v0, v1}, Lcom/brixd/niceapp/util/DetailRequestCacheUtil;->gotoCommunityDetail(I)V

    goto :goto_2
.end method


# virtual methods
.method public getCount()I
    .registers 2

    .prologue
    .line 130
    iget-object v0, p0, Lcom/brixd/niceapp/activity/SearchMoreActivity$AppsAdapter;->mAppModels:Ljava/util/ArrayList;

    invoke-virtual {v0}, Ljava/util/ArrayList;->size()I

    move-result v0

    return v0
.end method

.method public getItem(I)Ljava/lang/Object;
    .registers 3
    .param p1, "position"    # I

    .prologue
    .line 135
    iget-object v0, p0, Lcom/brixd/niceapp/activity/SearchMoreActivity$AppsAdapter;->mAppModels:Ljava/util/ArrayList;

    invoke-virtual {v0, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v0

    return-object v0
.end method

.method public getItemId(I)J
    .registers 4
    .param p1, "position"    # I

    .prologue
    .line 140
    int-to-long v0, p1

    return-wide v0
.end method

.method public getView(ILandroid/view/View;Landroid/view/ViewGroup;)Landroid/view/View;
    .registers 11
    .param p1, "position"    # I
    .param p2, "convertView"    # Landroid/view/View;
    .param p3, "parent"    # Landroid/view/ViewGroup;

    .prologue
    .line 145
    iget-object v4, p0, Lcom/brixd/niceapp/activity/SearchMoreActivity$AppsAdapter;->mAppModels:Ljava/util/ArrayList;

    invoke-virtual {v4, p1}, Ljava/util/ArrayList;->get(I)Ljava/lang/Object;

    move-result-object v1

    check-cast v1, Lcom/brixd/niceapp/model/AppModel;

    .line 147
    .local v1, "model":Lcom/brixd/niceapp/model/AppModel;
    if-nez p2, :cond_18

    .line 148
    iget-object v4, p0, Lcom/brixd/niceapp/activity/SearchMoreActivity$AppsAdapter;->this$0:Lcom/brixd/niceapp/activity/SearchMoreActivity;

    invoke-virtual {v4}, Lcom/brixd/niceapp/activity/SearchMoreActivity;->getContext()Landroid/content/Context;

    move-result-object v4

    const v5, 0x7f030072

    const/4 v6, 0x0

    invoke-static {v4, v5, v6}, Landroid/view/View;->inflate(Landroid/content/Context;ILandroid/view/ViewGroup;)Landroid/view/View;

    move-result-object p2

    .line 151
    :cond_18
    const v4, 0x7f0a002f

    invoke-virtual {p2, v4}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v0

    check-cast v0, Landroid/widget/ImageView;

    .line 152
    .local v0, "icon":Landroid/widget/ImageView;
    const v4, 0x7f0a0034

    invoke-virtual {p2, v4}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v3

    check-cast v3, Landroid/widget/TextView;

    .line 153
    .local v3, "title":Landroid/widget/TextView;
    const v4, 0x7f0a00bf

    invoke-virtual {p2, v4}, Landroid/view/View;->findViewById(I)Landroid/view/View;

    move-result-object v2

    check-cast v2, Landroid/widget/TextView;

    .line 155
    .local v2, "subTitle":Landroid/widget/TextView;
    invoke-virtual {v1}, Lcom/brixd/niceapp/model/AppModel;->getTitle()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v3, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 156
    invoke-virtual {v1}, Lcom/brixd/niceapp/model/AppModel;->getSubTitle()Ljava/lang/String;

    move-result-object v4

    invoke-virtual {v2, v4}, Landroid/widget/TextView;->setText(Ljava/lang/CharSequence;)V

    .line 157
    iget-object v4, p0, Lcom/brixd/niceapp/activity/SearchMoreActivity$AppsAdapter;->mImageLoader:Lcom/nostra13/universalimageloader/core/ImageLoader;

    invoke-virtual {v1}, Lcom/brixd/niceapp/model/AppModel;->getIconUrl()Ljava/lang/String;

    move-result-object v5

    iget-object v6, p0, Lcom/brixd/niceapp/activity/SearchMoreActivity$AppsAdapter;->mOptions:Lcom/nostra13/universalimageloader/core/DisplayImageOptions;

    invoke-virtual {v4, v5, v0, v6}, Lcom/nostra13/universalimageloader/core/ImageLoader;->displayImage(Ljava/lang/String;Landroid/widget/ImageView;Lcom/nostra13/universalimageloader/core/DisplayImageOptions;)V

    .line 159
    new-instance v4, Lcom/brixd/niceapp/activity/SearchMoreActivity$AppsAdapter$1;

    invoke-direct {v4, p0, v1}, Lcom/brixd/niceapp/activity/SearchMoreActivity$AppsAdapter$1;-><init>(Lcom/brixd/niceapp/activity/SearchMoreActivity$AppsAdapter;Lcom/brixd/niceapp/model/AppModel;)V

    invoke-virtual {p2, v4}, Landroid/view/View;->setOnClickListener(Landroid/view/View$OnClickListener;)V

    .line 166
    return-object p2
.end method
